#ifndef NANE_MEMORYSTREAM_H
#   define NANE_MEMORYSTREAM_H

#   include "ISeekable.h"

namespace nane
{
    class MemoryStream
        : public IInput
        , public IOutput
        , public ISeekable
    {
    public:
        MemoryStream( byte* _memBuffer, uint32 _memBufferSize );
        ~MemoryStream();

    public:
        uint32 Read( byte* _buffer, uint32 _count );
        uint32 Write( const byte* _data, uint32 _count );
        void Seek( uint32 _pos );
        uint32 Tell();
        uint32 Size() const;

    private:
        byte* m_memBuffer;
        byte* m_memBufferPointer;
        uint32 m_memBufferSize;
    };
}   // namespace nane

#endif	// NANE_MEMORYSTREAM_H

